<template>
  <main>
    <h1>Dashboard</h1>
    <div class="user">
      <span>用户名：</span><span>{{ getUsername }}</span>
    </div>
  </main>
</template>

<script>
import Cookies from "js-cookie";

export default {
  computed: {
    getUsername() {
      return Cookies.get("username");
    },
  },
};
</script>

<style lang="less" scoped>
main {
  h1 {
    text-align: center;
  }

  .user {
    text-align: center;
    font-size: 16px;
  }
}
</style>
